package br.com.vti.sisp_sicrim.model.entity.converter;

import java.util.ResourceBundle;

import javax.persistence.AttributeConverter;

import br.com.caelum.vraptor.Convert;
import br.com.caelum.vraptor.Converter;
import br.com.caelum.vraptor.ioc.ApplicationScoped;
import br.com.crud4j.core.model.converter.SelectEnumConverter;
import br.com.vti.sisp_sicrim.model.entity.enums.Cutis;

/**
 *
 * @author ednardomatos
 */
@ApplicationScoped
@Convert(Cutis.class)
@javax.persistence.Converter(autoApply = true)
public class CutisConverter extends SelectEnumConverter<Cutis> implements AttributeConverter<Cutis, String>, Converter<Cutis> {

    @Override
    public Cutis convert(String value, Class<? extends Cutis> type, ResourceBundle rb) {
        return convertToEntityAttribute(value);
    }
}